Video Smoothing Method and Apparatus

ABSTRACT

A method includes obtaining a to-be-processed current point in a target area in a current frame, obtaining a first-type smoothing weight of a first-type neighborhood point in an N th  frame before the current frame with respect to the current point, where the first-type neighborhood point is an X th  circle point that encircles a point corresponding to a location of the current point and that is in the N th  frame before the current frame, obtaining a second-type smoothing weight of a second-type neighborhood point in an M th  frame after the current frame with respect to the current point, where the second-type neighborhood point is a Y th  circle point that encircles the point corresponding to the location of the current point and that is in the M th  frame after the current frame, and performing smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national stage of International Application No. PCT/CN2015/094696, filed on Nov. 16, 2015, which is hereby incorporated by reference in its entirety.

TECHNICAL FIELD

Embodiments of the present invention relate to the field of image processing, and in particular, to a video smoothing method and apparatus.

BACKGROUND

Currently, with emergence and development of a mobile social network, using a mobile phone or another handheld terminal to take a selfie and perform facial beautification sweeps around the world. Divided according to user experience, selfie and facial beautification mainly have two types. One type is interactive facial beautification, that is, before facial beautification, a user needs to manually determine locations of facial organs, or correct the locations that are of the facial organs and that are automatically located by software, and facial beautification is performed based on the facial organs. Another type of facial beautification is one-tap facial beautification, that is, the user does not need to care about whether locating and division of the facial organs are accurate. After a photo is taken, a camera automatically divides and locates the locations of the facial organs according to a facial beautification algorithm, and automatically performs a facial beautification operation. This is full-automatic facial beautification. Considering a limitation of a screen size of the mobile phone and a requirement of most users for “shooting at any time and sharing at any time,” the one-tap facial beautification is more popular on the market.

For the one-tap facial beautification, in addition to performing automatic facial beautification on a shot photo, most applications further perform real-time facial beautification on a viewfinder video in a preview state, so that the user can view a facial beautification effect before the photo is shot. Real-time video facial beautification mainly includes skin highlighting and dermabrasion (skin smoothing). In a facial beautification algorithm in the prior art, dermabrasion is independently performed on a video frame, that is, dermabrasion between frames is independent of each other. Consequently, smoothness of areas corresponding to adjacent frames may be inconsistent, and a texture or edge flare phenomenon occurs on a video after dermabrasion, resulting in relatively severe impact on user experience.

SUMMARY

Embodiments of the present invention provide a video smoothing method and apparatus, so as to avoid a texture or edge flare phenomenon of a video.

According to a first aspect, a video smoothing method is provided, including obtaining, from a video frame, a to-be-processed current point in a target area in a current frame. The method also includes obtaining a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point, where the first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point and that is in the N^(th) frame before the current frame. Additionally, the method includes obtaining a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point, where the second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point and that is in the M^(th) frame after the current frame. The method also includes performing smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight, where M, N, X, and Y are positive integers.

In the foregoing solution, when smoothing calculation is performed on a point in a current frame, a smoothing weight of a point in an N^(th) frame before the current frame and a smoothing weight of a point in an M^(th) frame after the current frame are referenced at the same time, that is, a time correlation of a video frame is considered during smoothing calculation; therefore, a texture or edge flare phenomenon of a video caused by considering only a point in a single frame during smoothing calculation can be avoided.

With reference to the first aspect, in a first possible implementation, the obtaining a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point includes: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; obtaining a fourth-type smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame; and obtaining the first-type smoothing weight according to the fourth-type smoothing weight and the third-type smoothing weight.

With reference to the first aspect, in a second possible implementation, the obtaining a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point includes: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; and obtaining a fifth-type smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame; and obtaining the second-type smoothing weight according to the fifth-type smoothing weight and the third-type smoothing weight.

With reference to the first aspect, in a third possible implementation, after the obtaining, from a video frame, a to-be-smoothed current point in a target area in a current frame, the method further includes: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; and the performing smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight is specifically: performing smoothing calculation on the current point according to the first-type smoothing weight, the second-type smoothing weight, and the third-type smoothing weight.

In the solution provided in the third possible implementation of the first aspect, when smoothing calculation is performed on the point in the current frame, the smoothing weight of the point in the N^(th) frame before the current frame, the smoothing weight of the point in the M^(th) frame after the current frame, and a smoothing weight of the point in the current frame are referenced at the same time, that is, during smoothing calculation, a spatial correlation of the current frame is considered at the same time of considering the time correlation of the video frame; therefore, the texture or edge flare phenomenon of the video caused by considering only the point in the single frame during smoothing calculation can be avoided.

With reference to any one of the first aspect or the foregoing possible implementations, in a fourth possible implementation, the performing smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight includes: obtaining smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix};} \right.}$

and performing smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point, where:

W(k)*W(0)

is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or

W(k)*W′(0)

is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame.

With reference to the third possible implementation of the first aspect, in a fifth possible implementation, the performing smoothing calculation on the current point according to the first-type smoothing weight, the second-type smoothing weight, and the third-type smoothing weight includes: obtaining smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\prime}} \\ {0,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\prime}} \end{matrix},} \right.}$

where

W(k)*W′(0)

is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or W(k)*W′(0) is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame; obtaining a smoothing contribution of the third-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}} \\ {0,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}} \end{matrix},} \right.}$

where W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle, Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, Y(0) is a gray value or a brightness value of the current point, and MeanGrad_TH is an average gradient value of the target area in the current frame; and performing smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, the second-type neighborhood point, and the third-type neighborhood point to the current point.

With reference to any one of the first aspect or the possible implementations of the first aspect, each smoothing weight is a reciprocal of an exponential power of 2. Because each smoothing weight is the reciprocal of the exponential power of 2, a multiplication and division operation in smoothing calculation may be converted into a shift operation, improving a smoothing calculation speed.

According to a second aspect, a video smoothing apparatus is provided, including an obtaining unit, configured to obtain, from a video frame, a to-be-processed current point in a target area in a current frame. The apparatus also includes a processing unit, configured to obtain a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point, where the first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point and that is in the N^(th) frame before the current frame, where the processing unit is further configured to obtain a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point, where the second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point and that is in the M^(th) frame after the current frame. The processing unit is further configured to perform smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight, where M, N, X, and Y are positive integers.

In the foregoing solution, when smoothing calculation is performed on a point in a current frame, a smoothing weight of a point in an N^(th) frame before the current frame and a smoothing weight of a point in an M^(th) frame after the current frame are referenced at the same time, that is, a time correlation of a video frame is considered during smoothing calculation; therefore, a texture or edge flare phenomenon of a video caused by considering only a point in a single frame during smoothing calculation can be avoided.

With reference to the second aspect, in a first possible implementation, the processing unit is specifically configured to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; obtain a fourth-type smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame; and obtain the first-type smoothing weight according to the fourth-type smoothing weight and the third-type smoothing weight.

With reference to the second aspect, in a second possible implementation, the processing unit is specifically configured to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; obtain a fifth-type smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame; and obtain the second-type smoothing weight according to the fifth-type smoothing weight and the third-type smoothing weight.

With reference to the second aspect, in a third possible implementation, the processing unit is further configured to obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; and the processing unit is specifically configured to perform smoothing calculation on the current point according to the first-type smoothing weight, the second-type smoothing weight, and the third-type smoothing weight.

In the solution provided in the third possible implementation of the second aspect, when smoothing calculation is performed on the point in the current frame, the smoothing weight of the point in the N^(th) frame before the current frame, the smoothing weight of the point in the M^(th) frame after the current frame, and a smoothing weight of the point in the current frame are referenced at the same time, that is, during smoothing calculation, a spatial correlation of the current frame is considered at the same time of considering the time correlation of the video frame; therefore, the texture or edge flare phenomenon of the video caused by considering only the point in the single frame during smoothing calculation can be avoided.

With reference to any one of the second aspect or the foregoing possible implementations, in a fourth possible implementation, the processing unit is specifically configured to: obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\prime}} \\ {0,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\prime}} \end{matrix};} \right.}$

and perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point, where:

W(k)*W(0)

is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or

W(k)*W′(0)

is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame.

With reference to the third possible implementation of the second aspect, in a fifth possible implementation, the processing unit is specifically configured to: obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\prime}} \\ {0,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\prime}} \end{matrix},} \right.}$

where

W(k)*W′(0)

is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, W(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or W(k)*W′(0) is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH is an average gradient value of a target area in the M^(th) frame after the current frame; obtain a smoothing contribution of the third-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}} \\ {0,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}} \end{matrix},} \right.}$

where W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle, Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, Y(0) is a gray value or a brightness value of the current point, and MeanGrad_TH is an average gradient value of the target area in the current frame; and perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, the second-type neighborhood point, and the third-type neighborhood point to the current point.

With reference to any one of the second aspect or the possible implementations of the second aspect, each smoothing weight is a reciprocal of an exponential power of 2. Because each smoothing weight is the reciprocal of the exponential power of 2, a multiplication and division operation in smoothing calculation may be converted into a shift operation, improving a smoothing calculation speed.

According to a third aspect, a video smoothing apparatus is provided, including a camera module, a processor, a memory, and a bus, where the camera module, the processor, and the memory are connected and complete mutual communication by using the bus, the camera module is configured to collect a video frame and store the video frame by using the memory, and the processor is configured to process program code in the memory; and the processor is configured to execute the method executed by the obtaining unit and the processing unit in the third aspect.

According to a fourth aspect, a computer readable medium is provided, including a computer readable instruction for performing the following operation when the instruction is being executed: performing operations in any implementation provided in the first aspect.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly describes the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

FIG. 1 is a schematic flowchart of a video smoothing method according to an embodiment of the present invention;

FIG. 2 is a schematic flowchart of a video smoothing method according to another embodiment of the present invention;

FIG. 3 is a schematic diagram of a frame structure in a video smoothing method according to still another embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a video smoothing apparatus according to an embodiment of the present invention; and

FIG. 5 is a schematic structural diagram of a video smoothing apparatus according to another embodiment of the present invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are merely some but not all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present embodiments.

An embodiment of the present invention provides a video smoothing method, applied to a user terminal such as a mobile phone or a tablet computer. As shown in FIG. 1, the method includes the following steps.

101. Obtain, from a video frame, a to-be-processed current point in a target area in a current frame.

The user terminal generally performs video collection by using a camera module. A video is saved in a video frame manner. When the video is played, the video frame is played at a specific frequency (which is generally greater than 24 frames per second), and a viewer can view a consecutive video. In the foregoing step 101, the target area is an area in which smoothing calculation needs to be uniformly performed. The target area may be determined by using any method in the prior art. For example, the target area may be a skin area in a photo.

Optionally, the method further includes: 102. Obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point.

The third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame. That is, it may be understood that, during smoothing calculation on the current point, usually a smoothing weight of each neighborhood point in the current frame further needs to be referenced. Therefore, in an optional solution, step 102 further needs to be referenced.

103. Obtain a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point.

The first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point and that is in the N^(th) frame before the current frame. Specifically, a method for obtaining the first-type smoothing weight in step 103 is: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame, Z is a positive integer, and when step 102 is included, the third-type smoothing weight herein may be the third-type smoothing weight obtained in step 102; obtaining a fourth-type smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame; and obtaining the first-type smoothing weight according to the fourth-type smoothing weight and the third-type smoothing weight.

104. Obtain a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point.

The second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point and that is in the M^(th) frame after the current frame. Specifically, a method for obtaining the first-type smoothing weight in step 104 is: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame, Z is a positive integer, and when step 102 is included, the third-type smoothing weight herein may be the third-type smoothing weight obtained in step 102; obtaining a fifth-type smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame; and obtaining the second-type smoothing weight according to the fifth-type smoothing weight and the third-type smoothing weight.

105. Perform smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight.

Specifically, when step 102 is included, step 105 is specifically performing smoothing calculation on the current point according to the first-type smoothing weight, the second-type smoothing weight, and the third-type smoothing weight. In the foregoing solution, M, N, X, and Y are positive integers.

In the foregoing solution, steps 102, 103, and 104 are not a limitation on a sequence of the steps. That is, after the current point is determined in step 101, steps 102, 103, and 104 may be performed at the same time or may be performed in any other sequence.

In the foregoing solution, when smoothing calculation is performed on a point in a current frame, a smoothing weight of a point in an N^(th) frame before the current frame and a smoothing weight of a point in an M^(th) frame after the current frame are referenced at the same time, that is, a time correlation of a video frame is considered during smoothing calculation; therefore, a texture or edge flare phenomenon of a video caused by considering only a point in a single frame during smoothing calculation can be avoided. Further, when step 102 is included, in the foregoing solution, when smoothing calculation is performed on the point in the current frame, the smoothing weight of the point in the N^(th) frame before the current frame, the smoothing weight of the point in the M^(th) frame after the current frame, and a smoothing weight of the point in the current frame are referenced at the same time, that is, during smoothing calculation, a spatial correlation of the current frame is considered at the same time of considering the time correlation of the video frame; therefore, the texture or edge flare phenomenon of the video caused by considering only the point in the single frame during smoothing calculation can be avoided.

As shown in FIG. 2, an embodiment of the present invention provides another video smoothing method, including the following steps.

201. Obtain, from a video frame, a to-be-smoothed current point in a target area in a current frame.

Optionally, the method further includes: 202. Obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point.

The third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame. That is, it may be understood that, during smoothing calculation on the current point, usually a smoothing weight of each neighborhood point in the current frame further needs to be referenced. Therefore, in an optional solution, step 202 further needs to be referenced.

203. Obtain a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point.

The first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point and that is in the N^(th) frame before the current frame.

204. Obtain a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point.

The second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point and that is in the M^(th) frame after the current frame.

205. Obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to the following formula (1).

$\begin{matrix} {{{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack},{{\sigma (k)} = \left\{ \begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\prime}} \\ {0,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\prime}} \end{matrix} \right.}} & {{Formula}\mspace{14mu} (1)} \end{matrix}$

206. Perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point.

W(k)*W′(0) is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or W(k)*W′(0) is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH is an average gradient value of a target area in the M^(th) frame after the current frame. The average gradient value of the target area in the video frame is definition of an image in the target area, reflects a detail contrast expression capability of the image, and is generally represented by a gray variance rate of a pixel.

In the foregoing solution, when smoothing calculation is performed on a point in a current frame, a smoothing weight of a point in an N^(th) frame before the current frame and a smoothing weight of a point in an M^(th) frame after the current frame are referenced at the same time, that is, a time correlation of a video frame is considered during smoothing calculation; therefore, a texture or edge flare phenomenon of a video caused by considering only a point in a single frame during smoothing calculation can be avoided.

When step 202 is included, after step 204, the method specifically includes the following steps.

205. Obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to the following formula (2).

$\begin{matrix} {{{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack},{{\sigma (k)} = \left\{ \begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\prime}} \\ {0,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\prime}} \end{matrix} \right.}} & {{Formula}\mspace{14mu} (2)} \end{matrix}$

W(k)*W′(0) is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH is an average gradient value of a target area in the N^(th) frame before the current frame; or W(k)*W′(0) is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame.

206. Obtain a smoothing contribution of the third-type neighborhood point to the current point according to the following formula (3).

$\begin{matrix} {{{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack},{{\sigma (k)} = \left\{ \begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}} \\ {0,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}} \end{matrix} \right.}} & {{Formula}\mspace{14mu} (3)} \end{matrix}$

W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle, Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle,) Y(0) is a gray value or a brightness value of the current point, and MeanGrad_TH is an average gradient value of the target area in the current frame.

207. Perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, the second-type neighborhood point, and the third-type neighborhood point to the current point.

In the foregoing solution, when smoothing calculation is performed on the point in the current frame, the smoothing weight of the point in the N^(th) frame before the current frame, the smoothing weight of the point in the M^(th) frame after the current frame, and a smoothing weight of the point in the current frame are referenced at the same time, that is, during smoothing calculation, a spatial correlation of the current frame is considered at the same time of considering the time correlation of the video frame; therefore, the texture or edge flare phenomenon of the video caused by considering only the point in the single frame during smoothing calculation can be avoided.

For example, as shown in FIG. 3, a current frame t, a previous frame t−1 of the current frame, a second previous frame t−2 of the current frame, a next frame t+1 of the current frame t, and a second next frame t+2 of the current frame t are provided. Each frame includes a target area T. When smoothing calculation is performed on a current point a in a target area in the current frame t, in terms of space, that is, in the current frame t, smoothing calculation on the current point a is determined by a neighborhood point around the current point a, and a neighborhood point that is closer to the current point a contributes more to smoothing calculation on the current point a. A first-circle neighborhood point b and a second-circle neighborhood point c of the current point a are shown in FIG. 3. For example, if a smoothing weight allocated to a neighborhood point is W(k), in a same frame, a smoothing contribution of the neighborhood point to the current point is:

$\begin{matrix} {{{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}} \\ {0,} & {{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}} \end{matrix}.} \right.}} & {{Formula}\mspace{14mu} (4)} \end{matrix}$

It is described in the foregoing embodiment that Y(k) is a gray value or a brightness value of a third-type neighborhood point in a k^(th) circle, and Y(0) is a gray value or a brightness value of the current point. The formula (₄) indicates that if a gradient between a neighborhood point and the current point is relatively large, the neighborhood point does not participate in smoothing. The smoothing policy may effectively protect a characteristic of a complexion area. For example, for a facial area, a facial characteristic such as eyes or eyebrows may be effectively protected from being smoothed in the smoothing method. It may be understood that the average gradient value of the target area is updated when the current frame is updated.

In terms of time, smoothing calculation is performed on the current point by referencing neighborhood points in several frames before the current frame at the same time. For example, if a smoothing weight allocated to a neighborhood point of a neighboring frame is W′(k), in the neighboring frame, a smoothing contribution of the neighborhood point to the current point is:

$\begin{matrix} {{{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\prime}} \\ {0,} & {{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\prime}} \end{matrix}.} \right.}} & {{formula}\mspace{14mu} (5)} \end{matrix}$

A difference between the formula (5) and the formula (4) indicates that a weight of a point corresponding to the current point in the neighboring frame needs to be considered for the smoothing contribution of the neighborhood point in the neighboring frame to the current point. For example, a weight coefficient:

${W_{t}(1)} = \frac{1}{8}$

is allocated to the first-circle neighborhood point b of the current point a in the current frame in FIG. 3, and a weight coefficient:

${W_{t}(2)} = \frac{1}{16}$

is allocated to the second-circle neighborhood point c. A weight is allocated to a neighborhood point of a point corresponding to a location of the current point a in the neighboring frame by using a same method. A weight of a point corresponding to the location of the current point in the neighboring frame needs to be considered for the smoothing contribution of the neighborhood point in the neighboring frame to the current point. Therefore, if a weight allocated to a point a_(t−1) corresponding to the location of the current point a in a (t−1)^(th) frame is:

${{W_{t - 1}(0)} = \frac{1}{2}},$

a weight allocated to a point a_(t−2) corresponding to the location of the current point a in a (t−2)^(th) frame is:

${{W_{t - 2}(0)} = \frac{1}{4}},$

a weight allocated to a point a_(t+1) corresponding to the location of the current point a in a (t+1)^(th) frame is:

${{W_{t + 1}(0)} = \frac{1}{2}},$

and a weight allocated to a point a_(t+2) corresponding to the location of the current point a in a (t+2)^(th) frame is:

${{W_{t + 2}(0)} = \frac{1}{4}},$

a weight allocated to a first-circle neighborhood point b_(t−1) of the point a_(t−1) in the (t−1)^(th) frame is:

${{{W_{t - 1}(0)}{W_{t}(1)}} = \frac{1}{16}},$

and a weight allocated to a second-circle neighborhood point c_(t−1) of the point a_(t−1) in the (t−1)^(th) frame is:

${{{W_{t - 1}(0)}{W_{t}(2)}} = \frac{1}{32}};$

a weight allocated to a first-circle neighborhood point b_(t+1) of the point a_(t+1) in the (t+1)^(th) frame is:

${{{W_{t + 1}(0)}{W_{t}(1)}} = \frac{1}{16}},$

and a weight allocated to a second-circle neighborhood point c_(t+1) of the point a_(t+1) in the (t+1)^(th) frame is:

${{{W_{t + 1}(0)}{W_{t}(2)}} = \frac{1}{32}};$

a weight allocated to a first-circle neighborhood point b_(t−2) of the point a_(t−2) in the (t−2)^(th) frame is:

${{{W_{t - 2}(0)}{W_{t}(1)}} = \frac{1}{32}},$

and a weight allocated to a second-circle neighborhood point c_(t−2) of the point a_(t−2) in the (t−2)^(th) frame is:

${{{W_{t - 2}(0)}{W_{t}(2)}} = \frac{1}{64}};$

and a weight allocated to a first-circle neighborhood point b_(t+2) of the point a_(t+2) in the (t+2)^(th) frame is:

${{{W_{t + 2}(0)}{W_{t}(1)}} = \frac{1}{32}},$

and a weight allocated to a second-circle neighborhood point c_(t+2) of the point a_(t+2) in the (t+2)^(th) frame is:

${{W_{t + 2}(0)}{W_{t}(2)}} = {\frac{1}{64}.}$

In the foregoing embodiment, each smoothing weight is a reciprocal of an exponential power of 2. Therefore, a multiplication and division operation in smoothing calculation is converted into a shift operation, improving smoothing calculation efficiency.

In addition, smoothing calculation used in steps 105 and 207 may use a smoothing median filtering manner provided in this embodiment of the present invention. For example, the following formula may be used:

$\begin{matrix} {{{y(0)} = {{Y(0)} + \frac{\sum\limits_{k = 1}^{N}{{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack}}{\sum\limits_{k = 1}^{N}{{\sigma (k)}*{W(k)}}}}},{{\sigma (k)} = \left\{ \begin{matrix} {1,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}}} \end{matrix} \right.}} & {{Formula}\mspace{14mu} (6)} \end{matrix}$

In the formula (6), a gray value or a brightness value of a point (that is, the neighborhood point of the current point) that participates in smoothing is Y (k), a gray value or a brightness value of the current point is Y (o), a gray value or a brightness value of a smoothed current point is y (o), and W (k) is a smoothing weight of the point that participates in smoothing with respect to the current point. The foregoing smoothing calculation manner is merely an example, and certainly, it may be considered that another smoothing calculation manner in the prior art may be applied to this application.

As shown in FIG. 4, an embodiment of the present invention provides a video smoothing apparatus, configured to implement the video smoothing method provided in the foregoing embodiment. The apparatus includes: an obtaining unit 41, configured to obtain, from a video frame, a to-be-processed current point in a target area in a current frame; and a processing unit 42, configured to obtain a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point, where the first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point and that is in the N^(th) frame before the current frame, where the processing unit 42 is further configured to obtain a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point, where the second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point and that is in the M^(th) frame after the current frame; and the processing unit 42 is further configured to perform smoothing calculation on the current point according to the first-type smoothing weight and the second-type smoothing weight, where M, N, X, and Y are positive integers.

In the foregoing solution, when smoothing calculation is performed on a point in a current frame, a smoothing weight of a point in an N^(th) frame before the current frame and a smoothing weight of a point in an M^(th) frame after the current frame are referenced at the same time, that is, a time correlation of a video frame is considered during smoothing calculation; therefore, a texture or edge flare phenomenon of a video caused by considering only a point in a single frame during smoothing calculation can be avoided.

Optionally, the processing unit 42 is specifically configured to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; obtain a fourth-type smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame; and obtain the first-type smoothing weight according to the fourth-type smoothing weight and the third-type smoothing weight.

Optionally, the processing unit 42 is specifically configured to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; obtain a fifth-type smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame; and obtain the second-type smoothing weight according to the fifth-type smoothing weight and the third-type smoothing weight.

Further, the processing unit 42 is further configured to obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, where the third-type neighborhood point is a Z^(th) circle point that encircles the current point and that is in the current frame; and the processing unit 42 is specifically configured to perform smoothing calculation on the current point according to the first-type smoothing weight, the second-type smoothing weight, and the third-type smoothing weight.

In the foregoing solution, when smoothing calculation is performed on the point in the current frame, the smoothing weight of the point in the N^(th) frame before the current frame, the smoothing weight of the point in the M^(th) frame after the current frame, and a smoothing weight of the point in the current frame are referenced at the same time, that is, during smoothing calculation, a spatial correlation of the current frame is considered at the same time of considering the time correlation of the video frame; therefore, the texture or edge flare phenomenon of the video caused by considering only the point in the single frame during smoothing calculation can be avoided.

Optionally, the processing unit 42 is specifically configured to: obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix};} \right.}$

and perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point, where:

W(k)*W′(0)

is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or

W(k)*W′(0)

is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, the third-type neighborhood point is the Z^(th) circle point that encircles the current point and that is in the current frame, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame.

Optionally, the processing unit 42 is specifically configured to: obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix},} \right.}$

where

W(k)*W′(0)

is the smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; or W(k)*W′(0) is the smoothing weight of the second-type neighborhood point in a k^(th) circle, W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame; obtain a smoothing contribution of the third-type neighborhood point to the current point according to a formula:

${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack},{{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}}} \\ {0,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}}} \end{matrix},} \right.}$

where W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle, Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, Y(0) is a gray value or a brightness value of the current point, and MeanGrad_TH is an average gradient value of the target area in the current frame; and perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, the second-type neighborhood point, and the third-type neighborhood point to the current point.

Optionally, each smoothing weight is a reciprocal of an exponential power of 2. Because each smoothing weight is the reciprocal of the exponential power of 2, a multiplication and division operation in smoothing calculation may be converted into a shift operation, improving a smoothing calculation speed.

It should be noted that the obtaining unit 41 and the processing unit 42 in this embodiment may be independently disposed processors, or may be implemented by being integrated into a processor of the video smoothing apparatus, and in addition, may be stored in a memory of the video smoothing apparatus in a program code form. The processor of the video smoothing apparatus invokes and executes functions of the obtaining unit 41 and the processing unit 42. The processor described herein may be a central processing unit (CPU for short), or an application-specific integrated circuit (ASIC for short), or one or more integrated circuits configured to implement this embodiment of the present invention.

As shown in FIG. 5, an embodiment of the present invention provides a video smoothing apparatus, including a camera module 51, a processor 52, a memory 53, and a bus 54. The camera module 51, the processor 52, and the memory 53 are connected and complete mutual communication by using the bus 54.

It should be noted that the camera module 51 may be a sensor having an image collection function. For example, the camera module 51 may be a CCD (Charge Coupled Device), a CMOS (Complementary Metal-Oxide Semiconductor), or the like.

The processor 52 may be a processor, or may be a collective term of multiple processing elements. For example, the processor may be a central processing unit CPU, or may be an application-specific integrated circuit ASIC, or one or more integrated circuits configured to implement this embodiment of the present invention, for example, one or more microprocessors (digital signal processor, DSP for short) or one or more field programmable gate arrays (FPGA for short).

The memory 53 may be one storage apparatus or may be a collective term of multiple storage elements, and is configured to store executable program code or a parameter, data, and the like that are required for running an access network management device. In addition, the memory 53 may include a random access memory (RAM for short), and may further include a non-volatile memory (NVRAM for short), for example, a disk memory or a flash.

The bus 54 may be an industry standard architecture (ISA for short) bus, a peripheral component interconnect (PCI for short) bus, an extended industry standard architecture (EISA for short) bus, or the like. The bus 54 may be categorized into an address bus, a data bus, a control bus, and the like. For ease of denotation, the bus 54 is represented by using only one thick line in FIG. 5. However, it does not mean that there is only one bus or only one type of bus.

The camera module 51 is configured to collect a video frame and store the video frame by using the memory 53. The processor 52 is configured to process program code in the memory 54, and execute functions of the obtaining unit 41 and the processing unit 42 of the video smoothing apparatus in the foregoing apparatus embodiment. For details, refer to the foregoing apparatus embodiment, and details are not described herein again.

In addition, a computer readable medium is further provided, and includes a computer readable instruction for performing the following operation when the instruction is being executed: performing operations of 101 to 105 and 201 to 207 in the method in the foregoing embodiment.

In addition, a computer program product is further provided, including the foregoing computer readable medium.

It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in various embodiments of the present invention. The execution sequences of the processes should be determined according to functions and internal logic of the processes, and should not be construed as any limitation on the implementation processes of the embodiments of the present invention.

A person of ordinary skill in the art may be aware that, the units and algorithm steps in the examples described with reference to the embodiments disclosed in this specification may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the present embodiments.

It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working process of the foregoing system, apparatus, and unit, reference may be made to a corresponding process in the foregoing method embodiments, and details are not described.

In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other manners. For example, the described device embodiment is merely an example. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the devices or units may be implemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

When the functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present embodiments essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in the embodiments of the present invention. The foregoing storage medium includes: any medium that can store program code, such as a universal serial bus (USB) flash drive, a removable hard disk, a read-only memory (ROM for short), a random access memory (RAM for short), a magnetic disk, or an optical disc.

The foregoing descriptions are merely specific implementations of the present embodiments, but are not intended to limit the protection scope of the present embodiments. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present embodiments shall fall within the protection scope of the present embodiments. Therefore, the protection scope of the present embodiments shall be subject to the protection scope of the claims. 

1-22. (canceled)
 23. A method comprising: obtaining, by a video smoothing apparatus, a current point in a target area in a current frame; obtaining, by the video smoothing apparatus, a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point, wherein the first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point; obtaining, by the video smoothing apparatus, a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point, wherein the second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point; and performing, by the video smoothing apparatus, smoothing calculation on the current point according to the first-type smoothing weight and according to the second-type smoothing weight, wherein M, N, X, and Y are positive integers.
 24. The method according to claim 23, wherein obtaining the first-type smoothing weight of the first-type neighborhood point comprises: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point, and wherein Z is a positive integer; obtaining a fourth-type smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame; and obtaining the first-type smoothing weight according to the fourth-type smoothing weight and according to the third-type smoothing weight.
 25. The method according to claim 23, wherein obtaining the second-type smoothing weight of the second-type neighborhood point comprises: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point, and wherein Z is a positive integer; obtaining a fifth-type smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame; and obtaining the second-type smoothing weight according to the fifth-type smoothing weight and according to the third-type smoothing weight.
 26. The method according to claim 23, wherein the method further comprises: obtaining a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point, after obtaining the current point; and wherein performing smoothing calculation on the current point comprises performing smoothing calculation on the current point according to the first-type smoothing weight, according to the second-type smoothing weight, and according to the third-type smoothing weight.
 27. The method according to claim 26, wherein performing smoothing calculation on the current point comprises: obtaining a smoothing contribution of the first-type neighborhood point and obtaining a smoothing contribution of the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix};} \right.}$ and performing smoothing calculation on the current point according to the smoothing contribution of the first-type neighborhood point and according to the smoothing contribution of the second-type neighborhood point to the current point; and wherein W(k)*W′(0) is the first-type smoothing weight of the first-type neighborhood point in a k^(th) circle, W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein the third-type neighborhood point is the Z^(th) circle point that encircles the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, wherein Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame.
 28. The method according to claim 26, wherein performing smoothing calculation on the current point comprises: obtaining a smoothing contribution of the first-type neighborhood point and obtain a smoothing contribution of the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix};} \right.}$ and performing smoothing calculation on the current point according to the smoothing contribution of the first-type neighborhood point and according to the smoothing contribution of the second-type neighborhood point to the current point; and wherein W(k)*W′(0) is the second-type smoothing weight of the second-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, wherein Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame.
 29. The method according to claim 26, wherein performing smoothing calculation on the current point comprises: obtaining smoothing contributions of the first-type neighborhood point and of the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix},} \right.}$ wherein W(k)*W′(0) is the first-type smoothing weight of the first-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, wherein Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; obtaining a smoothing contribution of the third-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}}} \\ {0,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}}} \end{matrix},} \right.}$ wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle, wherein Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, wherein Y(0) is a gray value or a brightness value of the current point, and wherein MeanGrad_TH is an average gradient value of the target area in the current frame; and performing smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, according to the second-type neighborhood point, and according to the third-type neighborhood point to the current point.
 30. The method according to claim 26, wherein performing smoothing calculation on the current point comprises: obtaining smoothing contributions of the first-type neighborhood point and of the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix},} \right.}$ wherein W(k)*W′(0) is the second-type smoothing weight of the second-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, wherein Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame; obtaining a smoothing contribution of the third-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}}} \\ {0,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}}} \end{matrix},} \right.}$ wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle, wherein Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, wherein Y(0) is a gray value or a brightness value of the current point, and wherein MeanGrad_TH is an average gradient value of the target area in the current frame; and performing smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, according to the second-type neighborhood point, and according to the third-type neighborhood point to the current point.
 31. The method according to claim 23, wherein the first-type smoothing weight of the first-type neighborhood point is a reciprocal of an exponential power of 2, and wherein the second-type smoothing weight of the second-type neighborhood point is a reciprocal of an exponential power of
 2. 32. A video smoothing apparatus, comprising: a camera module coupled to a non-transitory computer readable storage medium by a bus., wherein the camera module is configured to collect a current frame and store the current frame in the non-transitory computer readable storage medium; a processor coupled to the camera module by a bus; and the non-transitory computer readable storage medium storing a program for execution by the processor, the program including instructions to: obtain a current point in a target area in the current frame; obtain a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point, wherein the first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point; obtain a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point, wherein the second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point; and perform smoothing calculation on the current point according to the first-type smoothing weight and according to the second-type smoothing weight, wherein M, N, X, and Y are positive integers.
 33. The apparatus according to claim 32, wherein the instructions further comprise instructions to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point; obtain a fourth-type smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame; and obtain the first-type smoothing weight according to the fourth-type smoothing weight and according to the third-type smoothing weight.
 34. The apparatus according to claim 32, wherein the instructions further comprise instructions to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point; obtain a fifth-type smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame; and obtain the second-type smoothing weight according to the fifth-type smoothing weight and according to the third-type smoothing weight.
 35. The apparatus according to claim 32, wherein the instructions further comprise instructions to: obtain a third-type smoothing weight of a third-type neighborhood point of the current point in the current frame with respect to the current point, wherein the third-type neighborhood point is a Z^(th) circle point that encircles the current point; and perform smoothing calculation on the current point according to the first-type smoothing weight, the second-type smoothing weight, and the third-type smoothing weight.
 36. The apparatus according to claim 35, wherein the instructions further comprise instructions to: obtain a smoothing contribution of the first-type neighborhood point and obtain a smoothing contribution of the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix};} \right.}$ and perform smoothing calculation on the current point according to the smoothing contribution of the first-type neighborhood point and according to the smoothing contribution of the second-type neighborhood point to the current point; and wherein W(k)*W′(0) is the first-type smoothing weight of the first-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein the third-type neighborhood point is the Z^(th) circle point that encircles the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, wherein Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame.
 37. The apparatus according to claim 35, wherein the instructions further comprise instructions to: obtain a smoothing contribution of the first-type neighborhood point and obtain a smoothing contribution of the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix};} \right.}$ and perform smoothing calculation on the current point according to the smoothing contribution of the first-type neighborhood point and according to the smoothing contribution of the second-type neighborhood point to the current point; and wherein W(k)*W′(0) is the second-type smoothing weight of the second-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein the third-type neighborhood point is the Z^(th) circle point that encircles the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, wherein Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame.
 38. The apparatus according to claim 35, wherein the instructions further comprise instructions to: obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {{MeanGrad\_ TH}\;}^{\prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix},} \right.}$ wherein W(k)*W′(0) is the first-type smoothing weight of the first-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the N^(th) frame before the current frame, wherein Y′(k) is a gray value or a brightness value of the first-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the N^(th) frame before the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the N^(th) frame before the current frame; obtain a smoothing contribution of the third-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}}} \\ {0,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}}} \end{matrix},} \right.}$ wherein W(k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle, wherein Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, wherein Y(0) is a gray value or a brightness value of the current point, and wherein MeanGrad_TH is an average gradient value of the target area in the current frame; and perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, according to the second-type neighborhood point, and according to the third-type neighborhood point to the current point.
 39. The apparatus according to claim 35, wherein the instructions further comprise instructions to: obtain smoothing contributions of the first-type neighborhood point and the second-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*{W^{\prime}(0)}*\left\lbrack {{Y^{\prime}(k)} - {Y^{\prime}(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} < {MeanGrad\_ TH}^{\; \prime}}} \\ {0,{{{if}\mspace{14mu} {{{Y^{\prime}(k)} - {Y^{\prime}(0)}}}} \geq {MeanGrad\_ TH}^{\; \prime}}} \end{matrix},} \right.}$ wherein W(k)*W′(0) is the second-type smoothing weight of the second-type neighborhood point in a k^(th) circle, wherein W(k) is the third-type smoothing weight of the third-type neighborhood point in the k^(th) circle of the current point with respect to the current point, wherein W′(0) is a smoothing weight of the point corresponding to the location of the current point in the M^(th) frame after the current frame, wherein Y′(k) is a gray value or a brightness value of the second-type neighborhood point in the k^(th) circle, wherein Y′(0) is a gray value or a brightness value of the point corresponding to the location of the current point in the M^(th) frame after the current frame, and wherein MeanGrad_TH′ is an average gradient value of a target area in the M^(th) frame after the current frame; obtain a smoothing contribution of the third-type neighborhood point to the current point according to a formula: ${{\sigma (k)}*{W(k)}*\left\lbrack {{Y(k)} - {Y(0)}} \right\rbrack}, {{\sigma (k)} = \left\{ {\begin{matrix} {1,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} < {MeanGrad\_ TH}}} \\ {0,{{{if}\mspace{14mu} {{{Y(k)} - {Y(0)}}}} \geq {MeanGrad\_ TH}}} \end{matrix},} \right.}$ wherein W (k) is the smoothing weight of the third-type neighborhood point in the k^(th) circle, wherein Y(k) is a gray value or a brightness value of the third-type neighborhood point in the k^(th) circle, wherein Y(0) is a gray value or a brightness value of the current point, and wherein MeanGrad_TH is an average gradient value of the target area in the current frame; and perform smoothing calculation on the current point according to the smoothing contributions of the first-type neighborhood point, according to the second-type neighborhood point, and according to the third-type neighborhood point to the current point.
 40. The apparatus according to claim 32, wherein the first-type smoothing weight of the first-type neighborhood point is a reciprocal of an exponential power of 2, and wherein the second-type smoothing weight of the second-type neighborhood point is a reciprocal of an exponential power of
 2. 41. A non-transitory computer readable storage medium storing a program for execution by a processor, the program including instructions for: obtaining a current point in a target area in a current frame; obtaining a first-type smoothing weight of a first-type neighborhood point in an N^(th) frame before the current frame with respect to the current point, wherein the first-type neighborhood point is an X^(th) circle point that encircles a point corresponding to a location of the current point; obtaining a second-type smoothing weight of a second-type neighborhood point in an M^(th) frame after the current frame with respect to the current point, wherein the second-type neighborhood point is a Y^(th) circle point that encircles the point corresponding to the location of the current point; and performing smoothing calculation on the current point according to the first-type smoothing weight and according to the second-type smoothing weight, wherein M, N, X, and Y are positive integers. 